| <?xml version="1.0"?>
| <?xml-stylesheet href="chrome://zotero-better-bibtex/content/skin/overlay.css" type="text/css"?>
overlay#zotero-better-bibtex-zoteroPane-overlay(xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul")
  script(src='chrome://zotero-better-bibtex/content/better-bibtex.js')/
  script.
    (function() {
      try {
        const startup = Zotero.BetterBibTeX.ready.pending
        Zotero.debug(`{better-bibtex-startup} script load, ${startup ? 'startup' : 'window-reload'}`)
        if (startup) {
          window.addEventListener('load', async function() {
            try {
              await Zotero.BetterBibTeX.startup('APP_STARTUP')
            }
            catch (err) {
              Zotero.debug(`{better-bibtex-startup} BetterBibTeX startup error: ${err.message}\n${err.stack ||''}`)
            }
          })
        }
      }
      catch (err) {
        Zotero.debug(`{better-bibtex-startup} BetterBibTeX initialization error: ${err.message}\n${err.stack ||''}`)
      }
    })()
